<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript" src="js/lib/jquery.min.js"></script>
    <link rel="stylesheet" href="fonts/iconfont.css">
    <link href="css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="css/bootstrap.css"/>
    <link rel="stylesheet/less" type="text/css" href="css/xStyle.less"/>
    <script type="text/javascript" src="js/lib/less.js"></script>
    <style>
      
    </style>
</head>

<body>
<div>

    <div>
        <div>
            <div id='div1'></div>
        </div>

    </div>


</div>
</body>
<script type="module">
    import xCRUD from './js/src/xCRUD.js';
    
    import {addBaseOrg,updateBaseOrg,deleteBaseOrg,
    	   batchDeleteBaseOrg,getBaseOrgList} from "./js/api/BaseOrg.js";
    	   
    import {queryCols, tableCols, viewCols,updateBinds} from './js/data/BaseOrg.js';

    let cfg = {
        el: 'div1',
        cb: {  
        	   retrieve: getBaseOrgList,
        	   delete:deleteBaseOrg,
        	   batchDelete:batchDeleteBaseOrg,
        	   insert:addBaseOrg,
        	   update:updateBaseOrg
        	},
        query:{
            cols: queryCols,
            obj: {regionCode:null,orgName:''}
        },
        table: {
            cols: tableCols,
            data: [],
            pagination: {
                pageIndex: 1,
                pageSize: 20,
                sizeOption: ["20", "50", "100", "200"]
            },
            style:"xtable fixed-table"
        },
        view: {
            cols: viewCols,
            style: 'modal-lg',
            col: 'col-md-4',
            tag:true
        },
        update:{
        	style:'modal-xl',
        	binds:updateBinds,
        	tag:true,
        	obj:{
        		orgId:null,
        		regionCode:null,
        		orgName:null,
        		shortName:null,
        		orgType:"1",
        		orgNature:null,
        		orgKind:null,
        		orgGrade:null,
        		orgLogo:null,
        		address:null
        	},
        	col: 'col-md-6',
        	tag:true
        },
        right: {create: true, batchDelete: true, update: true, delete: true}
    }

    let crud = new xCRUD(cfg);


</script>

</html>